package com.ymttest.common.enums;

/**
 * 优惠券的使用类型
 */
public enum UserTerminalSourceEnum {

	Other(0),

	Pc(1),

	Ios(2),

	Android(3),

	IPad(4);

	private int intValue;
	private static java.util.HashMap<Integer, UserTerminalSourceEnum> mappings;

	private synchronized static java.util.HashMap<Integer, UserTerminalSourceEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, UserTerminalSourceEnum>();
		}
		return mappings;
	}

	private UserTerminalSourceEnum(int value) {
		intValue = value;
		UserTerminalSourceEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static UserTerminalSourceEnum forValue(int value) {
		return getMappings().get(value);
	}
}